package registnet.records;

public class DefaultCourse extends AbstractCourse {

	private boolean offering[];
	
	
	/**
	 * Constructs a default course with an assigned code
	 * 
	 * @param 	courseCode
	 */
	public DefaultCourse(String courseCode){
		this.courseCode = courseCode;
	}

	
	/**
	 * Gets the semester(s) when the course is offered
	 * 
	 * @return 	An array of size three wherein
	 *			offering[0] true if course is offered during the first semester, false otherwise
	 *			offering[1] true if course is offered during the second semester, false otherwise
	 *			offering[2] true if course is offered during the summer, false otherwise
	 */
	public boolean[] getOffering() {
		return offering;
	}

	
	/**
	 * Sets the semester(s) when the course is offered
	 * 
	 * @param offering - An array of size three wherein
	 *			offering[0] true if course is offered during the first semester, false otherwise
	 *			offering[1] true if course is offered during the second semester, false otherwise
	 *			offering[2] true if course is offered during the summer, false otherwise
	 */
	public void setOffering(boolean[] offering) {
		this.offering = offering;
	}
	
	
	public boolean isOffered(int semester){
		return this.offering[semester - 1];
	}
	
}
